package com.example.com.skills_utf8;

import com.app.BaseActivity;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.TextureView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.TextView;

public class _58Activity extends BaseActivity implements OnClickListener{

	FrameLayout layout_content ;
	
	Button
	btn_diy_view
	,btn_velocity
	,btn_scroller
	,btn_diy_listview
	;
	
	@Override
	public Integer InitLayout() {
		// TODO Auto-generated method stub
		return R.layout.activity_58;
	}

	@Override
	public void InitListener() {
		// TODO Auto-generated method stub
		
		
		
	}

	@Override
	public void InitProcess() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void InitView() {
		// TODO Auto-generated method stub
		
		layout_content = (FrameLayout)findViewById(R.id.layout_content);
		btn_diy_view = (Button)findViewById(R.id.btn_diy_view);
		btn_velocity = (Button)findViewById(R.id.btn_velocity);
		btn_scroller = (Button)findViewById(R.id.btn_scroller);
		btn_diy_listview = (Button)findViewById(R.id.btn_diy_listview);
		
		btn_diy_view.setOnClickListener(this);
		btn_velocity.setOnClickListener(this);
		btn_scroller.setOnClickListener(this);
		btn_diy_listview.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
		Fragment fragment = null;
		
		switch(v.getId()){
		case R.id.btn_diy_view:
			fragment = new _58_1Fragment();
			break;
			
		case R.id.btn_velocity:
			fragment = new _58_2Fragment();
			break;
			
		case R.id.btn_scroller:
			fragment = new _58_3Fragment();
			break;
		case R.id.btn_diy_listview:
			fragment = new _58_4Fragment();
			break;
		}
		
		
		FragmentTransaction transaction = getFragmentManager().beginTransaction();
		transaction.replace(R.id.layout_content, fragment);
		transaction.commit();
		
		
	}
	
	
	
	
}
